#pragma once
#include<string>
#include<vector>
#include<map>
#include<algorithm>
#include<iterator>
using namespace std;

class Person;
class User;
class Admin;

__declspec(selectany)  vector<User>UserKu;
__declspec(selectany)  vector<Admin>AdminKu;
__declspec(selectany)  map<string, Person>Looking_forward;
//声明__declspec(selectany)防止重定义链接器错误

class Person {
private:string ID;
	   string name;
	   string password;
public:int type;  //种类编号，1表示用户，2表示管理员
	  Person(string a, string b, string c) :ID(a), name(b), password(c), type(2) {};
	  string GetID() {
		  return ID;
	  }
	  string Getname() {
		  return name;
	  }
	  string Getpassword() {
		  return password;
	  }
};

class User :public Person {
public:void login();
	  User(string a, string b, string c) :Person(a, b, c) {
		  this->type = 1;
	  };
};

class Admin :public Person {
public:void login();
	  Admin(string a, string b, string c) :Person(a, b, c) {
		  this->type = 2;
	  };
};

/* 功能：1.注册账号
2.登录账号
3.注销账号
*/

int enroll(string ID, string name, string password, bool isadmin);
string Login(string ID, string password, bool isadmin);